This class is derived by CFormView and is the core of the library, usually in the OnInitialUpdate() function you open cursors and set data sources, by doing this you have the form working with its navigation/modify capabilities.
Class member functions:
void AddCheckCtrl( UINT Id, CString field, UINT flags = FLAG_EDIT ); |
Associates the Idcheck box to the field of the first opened table. |
parameters: |
Id = identifyer of the checkbox control (it must be a logic field) |
field = the field you want to edit |
flags = the editing status (FLAG_EDIT=edit, FLAG_EDIT_R_ONLY=read only) |
void AddComboCtrl( UINT Id, CString field, UINT flags = FLAG_EDIT ); |
Associates the Id combo box to the field of the first opened table. |
parameters: |
Id = identifyer of the combobox control (it must be a long integer field) |
field = the field you want to edit |
flags = the editing status (FLAG_EDIT=edit, FLAG_EDIT_R_ONLY=read only) |
void AddEditCtrl( UINT Id, CString field, UINT flags = FLAG_EDIT ); |
Associate the Id edit control to the field of the first opened table. |
parameters: |
Id = identifyer of the edit control |
field = the field you want to edit |
flags = the editing status (FLAG_EDIT=edit, FLAG_EDIT_R_ONLY=read only) |
void AddListCol( UINT Id, CString field, int width, UINT flags = FLAG_EDIT ); |
Add a column to the specifyed grid |
parameters: |
Id = identifyer of the grid |
Field = the field you want to edit |
width = width of the column in pixels. |
flags = the editing status (FLAG_EDIT=edit, FLAG_EDIT_R_ONLY=read only) |
void AddListColCbo( UINT Id, CString field, int width, int nCur, UINT flags = FLAG_EDIT ); |
Add a column to the specifyed grid |
parameters: |
Id = identifyer of the grid. |
Field = the field you want to edit. |
width = width of the column in pixels. |
nCur = combo box cursor number. |
flags = the editing status (FLAG_EDIT=edit, FLAG_EDIT_R_ONLY=read only) |
CDBrs * Cursor( int i = 0 ); |
return the pointer of an open cursor, remember that this is derived from CDaoRecordset so you can use all the functions of the base class. |
BOOL Editing( void ); |
Return the editing status. |
void EnableEditing( BOOL E ); |
Enable / disable edit status (for internal use). |
void FillCombo( UINT Id, int nCur); |
Fill the combo box with an open cursor, the cursor must have the first field set as the description you want to appear in the list, and as second field the one associated to the item (must be a long integer). |
parameters: |
Id = identifyer of the combobox control |
NCur = Cursor number of the filling recordset |
int NCursor( void ); |
return the number of open cursors. |
void OpenCursor( UINT Id, int nCur); |
Open specifyed cursor to use in the form |
Id = identifyer of the combobox control |
NCur = Cursor number of the filling recordset |
void PrintPreview( CString s); |
You can easily customize this command to run the desired report, e.g. Crystal Report รข |